package owg.util.editor2d.entity;

/**Must be implemented by all objects that you should be able to scale in the Editor2D.
 * The exact meaning of a particular scale does not need to be the same across multiple objects,
 * but the editor's "snap scale" functionality will only work properly if the scale corresponds to the object's actualy size.*/
public interface Scaleable2D extends Placeable2D {
    /**Set the scaling of the object on both axes.
     * For objects that do not support non-uniform scaling, the newYScale parameter may be ignored.
     * <br/><br/>
     * This is a shorthand for {@link #setScale(float, float, boolean)} with tentative set to false.*/
    public default void setScale(float newXScale, float newYScale)
    {
    	setScale(newXScale, newYScale, false);
    }
    /**Set the scaling of the object on both axes.
     * For objects that do not support non-uniform scaling, the newYScale parameter may be ignored.
     * <br/><br/>
     * The operation may be "tentative", meaning that the user is transforming the object in the editor and that the scale will change in the near future.
     * The implementation may choose to omit certain calculations for tentative transformations. 
     * This will always be called with tentative set to false when the user completes or cancels the operation.*/
    public void setScale(float newXScale, float newYScale, boolean tentative);
    /**Returns the scaling of the object in the x direction.
     * For objects that do not support non-uniform scaling, this should return the object's scale across both axes.*/
    public float getXScale();
    /**Returns the scaling of the object in the y direction.
     * For objects that do not support non-uniform scaling, this method is not significant.*/
    public float getYScale();
}
